<template>
  <div class="list">
    <!-- <div style="color:#1890ff;font-size:16px;margin-bottom:10px">
      劳务单位
    </div>-->
    <div class="flexAround" style="margin-bottom:30px">
      <div class="part1_div">
        <div>劳务单位</div>
        <div>13</div>
      </div>
      <div class="part1_div">
        <div>班组</div>
        <div>26</div>
      </div>
      <div class="part1_div" style="  border-right: none;">
        <div>在场人数</div>
        <div>26</div>
      </div>
    </div>

    <div class="flexBetween" style="margin-bottom:10px">
      <div style="color:#333;font-size:18px">单位列表</div>
      <div class="flexBetween">
        <div style="margin-right:30px">
          <a-radio-group v-model="radioGroup" :style="{ marginBottom: '8px' }">
            <a-radio-button value="1">全部</a-radio-button>
            <a-radio-button value="2">在场</a-radio-button>
            <a-radio-button value="3">离场</a-radio-button>
          </a-radio-group>
        </div>
        <div>
          <a-input-search placeholder="请输入单位名称查询" style="width: 200px" @search="onSearch" />
          <br />
        </div>
      </div>
    </div>
    <div>
      <a-table :columns="columns" :data-source="data" @change="onChange">
        <div class="td_name" slot="laborName" slot-scope="text" @click="labor_info">{{ text }}</div>
      </a-table>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      radioGroup: "1",
      columns: [
        {
          title: "单位名称",
          dataIndex: "name",
          key: "laborName",
          scopedSlots: { customRender: "laborName" },
          align: "center"
        },
        {
          title: "班组",
          dataIndex: "classGrop",
          align: "center"
        },
        {
          title: "在场人数",
          dataIndex: "peopleNum",
          align: "center"
        },
        {
          title: "负责人",
          dataIndex: "personCharge",
          align: "center"
        },
        {
          title: "联系电话",
          dataIndex: "tell",
          align: "center"
        },
        {
          title: "进场时间",
          dataIndex: "entryTime",
          align: "center"
        },
        {
          title: "离场时间",
          dataIndex: "leaveTime",
          align: "center"
        }
      ],
      data: [
        {
          key: "1",
          name: "南京仁泰基础工程有限公司",
          classGrop: "路基施工一队，路基施工二队",
          peopleNum: 232,
          personCharge: "周遵伦",
          tell: "18726543781",
          entryTime: "2020-03-04",
          leaveTime: "2020-03-04"
        },

        {
          key: "2",
          name: "江苏路通建筑劳务有限公司",
          classGrop: "梁板预制施工队",
          peopleNum: 132,
          personCharge: "彭雪强",
          tell: "13625119730",
          entryTime: "2020-03-04",
          leaveTime: ""
        },
        {
          key: "3",
          name: "江苏国骄建设有限公司",
          classGrop: "钢便桥（平台）施工队",
          peopleNum: 78,
          personCharge: "朱从超",
          tell: "15380642529",
          entryTime: "2020-03-03",
          leaveTime: "2020-03-04"
        },
        {
          key: "4",
          name: "江苏淳泽建筑安装工程有限公司",
          classGrop: "文明施工班组",
          peopleNum: 35,
          personCharge: "耿协法",
          tell: "18236260803",
          entryTime: "2021-03-01",
          leaveTime: ""
        },
        {
          key: "5",
          name: "江苏国骄建设有限公司",
          classGrop: "义乌路箱涵施工队",
          peopleNum: 89,
          personCharge: "朱红兵",
          tell: "15908979366",
          entryTime: "2021-02-26",
          leaveTime: ""
        },
        {
          key: "6",
          name: "上海勇创环境岩土工程有限公司",
          classGrop: "路基施工处二队",
          peopleNum: 142,
          personCharge: "李思萝",
          tell: "13851319173",
          entryTime: "2021-02-24",
          leaveTime: ""
        },
        {
          key: "7",
          name: "南京仁泰基础工程有限公司",
          classGrop: "桩基施工处一队，桩基施工处二队",
          peopleNum: 450,
          personCharge: "陶小平",
          tell: "15950320848",
          entryTime: "2021-02-24",
          leaveTime: ""
        },
        {
          key: "8",
          name: "江苏淳泽建筑安装工程有限公司",
          classGrop: "保畅巡查队",
          peopleNum: 25,
          personCharge: "朱新洋",
          tell: "15895682701",
          entryTime: "2021-02-23",
          leaveTime: ""
        }
      ]
    };
  },
  methods: {
    onSearch() {},
    onChange(pagination, filters, sorter) {
      console.log("params", pagination, filters, sorter);
    },
    labor_info() {
      this.$router.push({ path: "/laborUnit" });
    }
  }
};
</script>

<style scoped>
::v-deep .ant-table-pagination.ant-pagination {
  display: none;
}
.part1_div {
  width: 375px;
  height: 50px;
  border-right: 1px solid #ccc;
  text-align: center;
}
.part1_div :nth-child(1) {
  color: #ccc;
  font-size: 14px;
}
.part1_div :nth-child(2) {
  color: #333;
  font-size: 23px;
}
.title {
  color: #1890ff;
  font-size: 16px;
  margin-bottom: 10px;
}
.td_name {
  color: #1890ff;
  cursor: pointer;
}
</style>
